package com.ktgj.train.service.impl;

import java.util.List;

import com.ktgj.train.domain.TrainOrderItemCRM;
import com.ktgj.train.domain.vo.TrainOrderItemVo;
import com.ktgj.train.service.ITrainOrderitemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.train.mapper.TrainOrderitemMapper;
import com.ktgj.train.domain.TrainOrderitem;

/**
 * 子订单Service业务层处理
 *
 * @author ruoyi
 * @date 2021-11-29
 */
@Service
public class TrainOrderitemServiceImpl implements ITrainOrderitemService
{
    @Autowired
    private TrainOrderitemMapper trainOrderitemMapper;

    /**
     * 查询子订单
     *
     * @param orderitemid 子订单ID
     * @return 子订单
     */
    @Override
    public TrainOrderitem selectTrainOrderitemById(Long orderitemid)
    {
        return trainOrderitemMapper.selectTrainOrderitemById(orderitemid);
    }

    @Override
    public TrainOrderitem queryTrainOrderitemById(Long orderitemnumber) {
        return trainOrderitemMapper.queryTrainOrderitemById(orderitemnumber);
    }

    /**
     * 查询子订单列表
     *
     * @param trainOrderitem 子订单
     * @return 子订单
     */
    @Override
    public List<TrainOrderitem> selectTrainOrderitemList(TrainOrderitem trainOrderitem)
    {
        return trainOrderitemMapper.selectTrainOrderitemList(trainOrderitem);
    }

    /**
     * 新增子订单
     *
     * @param trainOrderitem 子订单
     * @return 结果
     */
    @Override
    public int insertTrainOrderitem(TrainOrderitem trainOrderitem)
    {
        return trainOrderitemMapper.insertTrainOrderitem(trainOrderitem);
    }

    /**
     * 修改子订单
     *
     * @param trainOrderitem 子订单
     * @return 结果
     */
    @Override
    public int updateTrainOrderitem(TrainOrderitem trainOrderitem)
    {
        return trainOrderitemMapper.updateTrainOrderitem(trainOrderitem);
    }

    @Override
    public int updateByIDNumber(TrainOrderitem trainOrderitem) {
        return trainOrderitemMapper.updateByIDNumber(trainOrderitem);
    }

    @Override
    public int updateByOrderId(TrainOrderitem trainOrderitem) {
        return trainOrderitemMapper.updateByOrderId(trainOrderitem);
    }

    @Override
    public int updateByTrainOrderItem(Long orderId) {
        return trainOrderitemMapper.updateByTrainOrderItem(orderId);
    }

    @Override
    public List<TrainOrderitem> queryTrainOrderItem(Long orderItemID) {
        return trainOrderitemMapper.queryTrainOrderItem(orderItemID);
    }

    @Override
    public List<TrainOrderitem> selectNumber(String orderPartnerNumber) {
        return trainOrderitemMapper.selectNumber(orderPartnerNumber);
    }

    @Override
    public TrainOrderitem queryOrderitemid(String ticketnumber) {
        return trainOrderitemMapper.queryOrderitemid(ticketnumber);
    }

    @Override
    public List<TrainOrderItemCRM> trainOrderItem(Long orderId) {
        return trainOrderitemMapper.trainOrderItem(orderId);
    }

    @Override
    public List<TrainOrderitem> selectTrainOrderitemByOrderId(Long orderid) {
        return trainOrderitemMapper.selectTrainOrderitemByOrderId(orderid);
    }

    /**
     * 批量删除子订单
     *
     * @param orderitemids 需要删除的子订单ID
     * @return 结果
     */
    @Override
    public int deleteTrainOrderitemByIds(Long[] orderitemids)
    {
        return trainOrderitemMapper.deleteTrainOrderitemByIds(orderitemids);
    }

    /**
     * 删除子订单信息
     *
     * @param orderitemid 子订单ID
     * @return 结果
     */
    @Override
    public int deleteTrainOrderitemById(Long orderitemid)
    {
        return trainOrderitemMapper.deleteTrainOrderitemById(orderitemid);
    }


}
